package com.wlcj.www.model.main;

import com.jfinal.plugin.activerecord.Model;
import com.wlcj.util.CacheKeyUtil;
import com.wlcj.util.RedisUtil;

public class ChannelExt extends Model<ChannelExt> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5618182261817187639L;
	
	public static final ChannelExt dao = new ChannelExt();
	
	public ChannelExt getCacheChannelExtById(int id) {
		String key = CacheKeyUtil.getChannelExtKey(id);
		ChannelExt ce = RedisUtil.get(key);
		if(ce==null) {
			ce = findById(id);
			RedisUtil.set(key, ce);
		}
		return ce;
	}

}
